package com.nosweattechnet.placemap;


import android.content.Intent;
import android.os.Bundle;

import com.nosweattechnet.mapmyway.R;


//Activity in charge of getting the position of a new item
public class AddItemActivity extends SuperAddItemActivity {
	private String placeid;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Intent intent=getIntent();
        placeid=intent.getStringExtra(getString(R.string.place_id_intent));
    }
    
    //Opens an activity to specify the name and description of the item
    protected void onTouchEvent(float x, float y, float z){
    	//Passes the placid, x, y, and z values to the new activity
    	Intent intent=new Intent(this,AddItemInformationActivity.class);
    	intent.putExtra(getString(R.string.place_id_intent),placeid);
    	intent.putExtra(getString(R.string.x_coord_intent),x);
    	intent.putExtra(getString(R.string.y_coord_intent),y);
    	intent.putExtra(getString(R.string.z_coord_intent),z);
    	this.startActivity(intent);
    	//Exits activity once the previous activity ends
    	finish();
    }
}
